CREATE TABLE [dbo].[TDAMAR_NCCL]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_UNID_CONC] [dbo].[TD_VC_003] NOT NULL,
[NU_AMAR] [dbo].[TD_VC_008] NOT NULL,
[FE_AMAR] [dbo].[TD_DT_001] NOT NULL,
[NU_SECU] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDAMAR_NC__NU_SE__473C8FC7] DEFAULT ((0)),
[CO_TIDO_DEST] [dbo].[TD_VC_003] NULL,
[NU_DOCU_DEST] [dbo].[TD_VC_020] NULL,
[IM_COBR_DEST] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_NC__IM_CO__4830B400] DEFAULT ((0)),
[IM_SALD_DEST] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_NC__IM_SA__4924D839] DEFAULT ((0)),
[IM_SALD_CDES] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_NC__IM_SA__4A18FC72] DEFAULT ((0)),
[CO_TIDO_ORIG] [dbo].[TD_VC_003] NULL,
[NU_DOCU_ORIG] [dbo].[TD_VC_020] NULL,
[IM_COBR_ORIG] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_NC__IM_CO__4B0D20AB] DEFAULT ((0)),
[IM_SALD_ORIG] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_NC__IM_SA__4C0144E4] DEFAULT ((0)),
[IM_SALD_CORI] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_NC__IM_SA__4CF5691D] DEFAULT ((0)),
[ST_CIER_DOCU] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TDAMAR_NC__ST_CI__4DE98D56] DEFAULT ('N'),
[IM_COBR_CDES] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_NC__IM_CO__4FD1D5C8] DEFAULT ((0)),
[IM_COBR_CORI] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_NC__IM_CO__50C5FA01] DEFAULT ((0)),
[CO_ENTI] [dbo].[TD_VC_020] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDAMAR_NC__CO_US__51BA1E3A] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDAMAR_NC__FE_US__52AE4273] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDAMAR_NC__CO_US__53A266AC] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDAMAR_NC__FE_US__54968AE5] DEFAULT (getdate()),
[IM_PAGO_PDTS] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_NC__IM_PA__3B4C8585] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDAMAR_NCCL] WITH NOCHECK ADD CONSTRAINT [CK__TDAMAR_NC__ST_CI__4EDDB18F] CHECK NOT FOR REPLICATION (([ST_CIER_DOCU]='N' OR [ST_CIER_DOCU]='S'))
GO
ALTER TABLE [dbo].[TDAMAR_NCCL] ADD CONSTRAINT [PK__TDAMAR_N__F88147646517D6C8] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_UNID_CONC], [NU_AMAR], [FE_AMAR], [NU_SECU]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDAMAR_NCCL] ADD CONSTRAINT [FK__TDAMAR_NCCL__23F41EE1] FOREIGN KEY ([CO_EMPR], [CO_UNID_CONC], [NU_AMAR], [FE_AMAR]) REFERENCES [dbo].[TCAMAR_NCCL] ([CO_EMPR], [CO_UNID_CONC], [NU_AMAR], [FE_AMAR])
GO
